1 module directx.d2d1effectauthor;
2 //---------------------------------------------------------------------------
3 // Copyright (c) Microsoft Corporation.  All rights reserved.
4 //
5 // This file is automatically generated.  Please do not edit it directly.
6 //
7 // File name: D2D1EffectAuthor.h
8 //---------------------------------------------------------------------------
9 
10 version(Windows):
11 version(Direct2D_Effects):
12 
13 public import directx.d2d1_1;
14 
15 public import directx.com;
16 
17 /// <summary>
18 /// Function pointer that sets a property on an effect.
19 /// </summary>
20 alias PD2D1_PROPERTY_SET_FUNCTION = extern(Windows) HRESULT function(IUnknown effect, const(BYTE)* data, UINT32 dataSize);
21 
22 /// <summary>
23 /// Function pointer that gets a property from an effect.
24 /// </summary>
25 alias PD2D1_PROPERTY_GET_FUNCTION = extern(Windows) HRESULT function(const IUnknown effect, BYTE* data, UINT32 dataSize, UINT32* actualSize);
26 
27 /// <summary>
28 /// Indicates what has changed since the last time the effect was asked to prepare
29 /// to render.
30 /// </summary>
31 alias D2D1_CHANGE_TYPE = uint;
32 enum : D2D1_CHANGE_TYPE
33 {
34 
35     /// <summary>
36     /// Nothing has changed.
37     /// </summary>
38     D2D1_CHANGE_TYPE_NONE = 0,
39     
40     /// <summary>
41     /// The effect's properties have changed.
42     /// </summary>
43     D2D1_CHANGE_TYPE_PROPERTIES = 1,
44     
45     /// <summary>
46     /// The internal context has changed and should be inspected.
47     /// </summary>
48     D2D1_CHANGE_TYPE_CONTEXT = 2,
49     
50     /// <summary>
51     /// A new graph has been set due to a change in the input count.
52     /// </summary>
53     D2D1_CHANGE_TYPE_GRAPH = 3
54 }
55 
56 
57 /// <summary>
58 /// Indicates options for drawing using a pixel shader.
59 /// </summary>
60 alias D2D1_PIXEL_OPTIONS = uint;
61 enum : D2D1_PIXEL_OPTIONS
62 {
63     
64     /// <summary>
65     /// Default pixel processing.
66     /// </summary>
67     D2D1_PIXEL_OPTIONS_NONE = 0,
68     
69     /// <summary>
70     /// Indicates that the shader samples its inputs only at exactly the same scene
71     /// coordinate as the output pixel, and that it returns transparent black whenever
72     /// the input pixels are also transparent black.
73     /// </summary>
74     D2D1_PIXEL_OPTIONS_TRIVIAL_SAMPLING = 1
75 }
76 
77 
78 /// <summary>
79 /// Indicates options for drawing custom vertices set by transforms.
80 /// </summary>
81 alias D2D1_VERTEX_OPTIONS = uint;
82 enum : D2D1_VERTEX_OPTIONS
83 {
84     
85     /// <summary>
86     /// Default vertex processing.
87     /// </summary>
88     D2D1_VERTEX_OPTIONS_NONE = 0,
89     
90     /// <summary>
91     /// Indicates that the output rectangle does not need to be cleared before drawing
92     /// custom vertices. This must only be used by transforms whose custom vertices
93     /// completely cover their output rectangle.
94     /// </summary>
95     D2D1_VERTEX_OPTIONS_DO_NOT_CLEAR = 1,
96     
97     /// <summary>
98     /// Causes a depth buffer to be used while drawing custom vertices. This impacts
99     /// drawing behavior when primitives overlap one another.
100     /// </summary>
101     D2D1_VERTEX_OPTIONS_USE_DEPTH_BUFFER = 2,
102     
103     /// <summary>
104     /// Indicates that custom vertices do not form primitives which overlap one another.
105     /// </summary>
106     D2D1_VERTEX_OPTIONS_ASSUME_NO_OVERLAP = 4
107 }
108 
109 
110 /// <summary>
111 /// Describes how a vertex buffer is to be managed.
112 /// </summary>
113 alias D2D1_VERTEX_USAGE = uint;
114 enum : D2D1_VERTEX_USAGE
115 {
116     
117     /// <summary>
118     /// The vertex buffer content do not change frequently from frame to frame.
119     /// </summary>
120     D2D1_VERTEX_USAGE_STATIC = 0,
121     
122     /// <summary>
123     /// The vertex buffer is intended to be updated frequently.
124     /// </summary>
125     D2D1_VERTEX_USAGE_DYNAMIC = 1
126 
127 }
128 
129 
130 /// <summary>
131 /// Describes a particular blend in the D2D1_BLEND_DESCRIPTION structure.
132 /// </summary>
133 alias D2D1_BLEND_OPERATION = uint;
134 enum : D2D1_BLEND_OPERATION
135 {
136     D2D1_BLEND_OPERATION_ADD = 1,
137     D2D1_BLEND_OPERATION_SUBTRACT = 2,
138     D2D1_BLEND_OPERATION_REV_SUBTRACT = 3,
139     D2D1_BLEND_OPERATION_MIN = 4,
140     D2D1_BLEND_OPERATION_MAX = 5
141 }
142 
143 
144 /// <summary>
145 /// Describes a particular blend in the D2D1_BLEND_DESCRIPTION structure.
146 /// </summary>
147 alias D2D1_BLEND = uint;
148 enum : D2D1_BLEND
149 {
150     D2D1_BLEND_ZERO = 1,
151     D2D1_BLEND_ONE = 2,
152     D2D1_BLEND_SRC_COLOR = 3,
153     D2D1_BLEND_INV_SRC_COLOR = 4,
154     D2D1_BLEND_SRC_ALPHA = 5,
155     D2D1_BLEND_INV_SRC_ALPHA = 6,
156     D2D1_BLEND_DEST_ALPHA = 7,
157     D2D1_BLEND_INV_DEST_ALPHA = 8,
158     D2D1_BLEND_DEST_COLOR = 9,
159     D2D1_BLEND_INV_DEST_COLOR = 10,
160     D2D1_BLEND_SRC_ALPHA_SAT = 11,
161     D2D1_BLEND_BLEND_FACTOR = 14,
162     D2D1_BLEND_INV_BLEND_FACTOR = 15
163 }
164 
165 
166 /// <summary>
167 /// Allows a caller to control the channel depth of a stage in the rendering
168 /// pipeline.
169 /// </summary>
170 alias D2D1_CHANNEL_DEPTH = uint;
171 enum : D2D1_CHANNEL_DEPTH
172 {
173     D2D1_CHANNEL_DEPTH_DEFAULT = 0,
174     D2D1_CHANNEL_DEPTH_1 = 1,
175     D2D1_CHANNEL_DEPTH_4 = 4
176 }
177 
178 
179 /// <summary>
180 /// Represents filtering modes transforms may select to use on their input textures.
181 /// </summary>
182 alias D2D1_FILTER = uint;
183 enum : D2D1_FILTER
184 {
185     D2D1_FILTER_MIN_MAG_MIP_POINT = 0x00,
186     D2D1_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x01,
187     D2D1_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x04,
188     D2D1_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x05,
189     D2D1_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10,
190     D2D1_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11,
191     D2D1_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14,
192     D2D1_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
193     D2D1_FILTER_ANISOTROPIC = 0x55
194 }
195 
196 
197 /// <summary>
198 /// Defines capabilities of the underlying D3D device which may be queried using
199 /// CheckFeatureSupport.
200 /// </summary>
201 alias D2D1_FEATURE = uint;
202 enum : D2D1_FEATURE
203 {
204     D2D1_FEATURE_DOUBLES = 0,
205     D2D1_FEATURE_D3D10_X_HARDWARE_OPTIONS = 1
206 }
207 
208 
209 /// <summary>
210 /// Defines a property binding to a function. The name must match the property
211 /// defined in the registration schema.
212 /// </summary>
213 struct D2D1_PROPERTY_BINDING
214 {
215     
216     /// <summary>
217     /// The name of the property.
218     /// </summary>
219     PCWSTR propertyName;
220     
221     /// <summary>
222     /// The function that will receive the data to set.
223     /// </summary>
224     PD2D1_PROPERTY_SET_FUNCTION setFunction;
225     
226     /// <summary>
227     /// The function that will be asked to write the output data.
228     /// </summary>
229     PD2D1_PROPERTY_GET_FUNCTION getFunction;
230 }
231 
232 
233 /// <summary>
234 /// This is used to define a resource texture when that resource texture is created.
235 /// </summary>
236 struct D2D1_RESOURCE_TEXTURE_PROPERTIES
237 {
238     const(UINT32)* extents;
239     UINT32 dimensions;
240     D2D1_BUFFER_PRECISION bufferPrecision;
241     D2D1_CHANNEL_DEPTH channelDepth;
242     D2D1_FILTER filter;
243     const(D2D1_EXTEND_MODE)* extendModes;
244 }
245 
246 
247 /// <summary>
248 /// This defines a single element of the vertex layout.
249 /// </summary>
250 struct D2D1_INPUT_ELEMENT_DESC
251 {
252     PCSTR semanticName;
253     UINT32 semanticIndex;
254     DXGI_FORMAT format;
255     UINT32 inputSlot;
256     UINT32 alignedByteOffset;
257 }
258 
259 
260 // 
261 // Set to alignedByteOffset within D2D1_INPUT_ELEMENT_DESC for elements that 
262 // immediately follow preceding elements in memory
263 //
264 enum D2D1_APPEND_ALIGNED_ELEMENT = 0xffffffff;
265 
266 
267 /// <summary>
268 /// This defines the properties of a vertex buffer which uses the default vertex
269 /// layout.
270 /// </summary>
271 struct D2D1_VERTEX_BUFFER_PROPERTIES
272 {
273     UINT32 inputCount;
274     D2D1_VERTEX_USAGE usage;
275     const(BYTE)* data;
276     UINT32 byteWidth;
277 }
278 
279 
280 /// <summary>
281 /// This defines the input layout of vertices and the vertex shader which processes
282 /// them.
283 /// </summary>
284 struct D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES
285 {
286     const(BYTE)* shaderBufferWithInputSignature;
287     UINT32 shaderBufferSize;
288     const(D2D1_INPUT_ELEMENT_DESC)* inputElements;
289     UINT32 elementCount;
290     UINT32 stride;
291 }
292 
293 
294 /// <summary>
295 /// This defines the range of vertices from a vertex buffer to draw.
296 /// </summary>
297 struct D2D1_VERTEX_RANGE
298 {
299     UINT32 startVertex;
300     UINT32 vertexCount;
301 }
302 
303 
304 /// <summary>
305 /// Blend description which configures a blend transform object.
306 /// </summary>
307 struct D2D1_BLEND_DESCRIPTION
308 {
309     D2D1_BLEND sourceBlend;
310     D2D1_BLEND destinationBlend;
311     D2D1_BLEND_OPERATION blendOperation;
312     D2D1_BLEND sourceBlendAlpha;
313     D2D1_BLEND destinationBlendAlpha;
314     D2D1_BLEND_OPERATION blendOperationAlpha;
315     FLOAT[4] blendFactor;
316 };
317 
318 
319 /// <summary>
320 /// Describes options transforms may select to use on their input textures.
321 /// </summary>
322 struct D2D1_INPUT_DESCRIPTION
323 {
324     D2D1_FILTER filter;
325     UINT32 levelOfDetailCount;
326 }
327 
328 
329 /// <summary>
330 /// Indicates whether shader support for doubles is present on the underlying
331 /// hardware.  This may be populated using CheckFeatureSupport.
332 /// </summary>
333 struct D2D1_FEATURE_DATA_DOUBLES
334 {
335     BOOL doublePrecisionFloatShaderOps;
336 }
337 
338 
339 /// <summary>
340 /// Indicates support for features which are optional on D3D10 feature levels.  This
341 /// may be populated using CheckFeatureSupport.
342 /// </summary>
343 struct D2D1_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS
344 {
345     BOOL computeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x;
346 }
347 
348 mixin(uuid!(ID2D1VertexBuffer, "9b8b1336-00a5-4668-92b7-ced5d8bf9b7b"));
349 /// <summary>
350 /// A transform uses this interface to write new vertices to a vertex buffer.
351 /// </summary>
352 interface ID2D1VertexBuffer : IUnknown
353 {
354 	extern(Windows):
355     HRESULT Map(
356     	BYTE** data,
357         UINT32 bufferSize 
358         );
359     
360     HRESULT Unmap();
361 } // interface ID2D1VertexBuffer
362 
363 mixin(uuid!(ID2D1ResourceTexture, "688d15c3-02b0-438d-b13a-d1b44c32c39a"));
364 interface ID2D1ResourceTexture : IUnknown
365 {
366 	extern(Windows):
367     /// <summary>
368     /// Update the vertex text.
369     /// </summary>
370     HRESULT Update(
371         const(UINT32)* minimumExtents,
372         const(UINT32)* maximimumExtents,
373         const(UINT32)* strides,
374         UINT32 dimensions,
375         const(BYTE)* data,
376         UINT32 dataCount 
377         );
378 } // interface ID2D1ResourceTexture
379 
380 
381 mixin(uuid!(ID2D1RenderInfo, "519ae1bd-d19a-420d-b849-364f594776b7"));
382 /// <summary>
383 /// A transform uses this interface to specify how to render a particular pass in
384 /// D2D.
385 /// </summary>
386 interface ID2D1RenderInfo : IUnknown
387 {
388 	extern(Windows):
389     /// <summary>
390     /// Sets options for sampling the specified image input
391     /// </summary>
392     HRESULT SetInputDescription(
393         UINT32 inputIndex,
394         D2D1_INPUT_DESCRIPTION inputDescription 
395         );
396     
397     /// <summary>
398     /// Controls the output precision and channel-depth for the associated transform.
399     /// </summary>
400     HRESULT SetOutputBuffer(
401         D2D1_BUFFER_PRECISION bufferPrecision,
402         D2D1_CHANNEL_DEPTH channelDepth 
403         );
404     
405     /// <summary>
406     /// Controls whether the output of the associated transform is cached.
407     /// </summary>
408     void SetCached(BOOL isCached);
409     
410     /// <summary>
411     /// Provides a hint of the approximate shader instruction count per pixel.  If
412     /// provided, it may improve performance when processing large images.  Instructions
413     /// should be counted multiple times if occurring within loops.
414     /// </summary>
415     void SetInstructionCountHint(UINT32 instructionCount);
416 } // interface ID2D1RenderInfo
417 
418 
419 mixin(uuid!(ID2D1DrawInfo, "693ce632-7f2f-45de-93fe-18d88b37aa21"));
420 /// <summary>
421 /// A transform uses this interface to specify how to render a particular pass using
422 /// pixel and vertex shaders.
423 /// </summary>
424 interface ID2D1DrawInfo : ID2D1RenderInfo
425 {
426 	extern(Windows):
427     /// <summary>
428     /// Set the constant buffer for this transform's pixel shader.
429     /// </summary>
430     HRESULT SetPixelShaderConstantBuffer(
431         const(BYTE)* buffer,
432         UINT32 bufferCount 
433         );
434     
435     /// <summary>
436     /// Sets the resource texture corresponding to the given shader texture index.
437     /// </summary>
438     HRESULT SetResourceTexture(
439         UINT32 textureIndex,
440         ID2D1ResourceTexture resourceTexture 
441         );
442     
443     /// <summary>
444     /// Set the constant buffer for this transform's vertex shader.
445     /// </summary>
446     HRESULT SetVertexShaderConstantBuffer(
447         const(BYTE)* buffer,
448         UINT32 bufferCount 
449         );
450     
451     /// <summary>
452     /// Set the shader instructions for this transform.
453     /// </summary>
454     HRESULT SetPixelShader(
455         REFGUID shaderId,
456         D2D1_PIXEL_OPTIONS pixelOptions = D2D1_PIXEL_OPTIONS_NONE 
457         );
458     
459     /// <summary>
460     /// Set custom vertices for the associated transform.  A blend mode if
461     /// foreground-over will be used if blendDescription is null.
462     /// </summary>
463     HRESULT SetVertexProcessing(
464         ID2D1VertexBuffer vertexBuffer,
465         D2D1_VERTEX_OPTIONS vertexOptions,
466         const(D2D1_BLEND_DESCRIPTION)* blendDescription = null,
467         const(D2D1_VERTEX_RANGE)* vertexRange = null,
468         const(GUID)* vertexShader = null 
469         );
470 } // interface ID2D1DrawInfo
471 
472 
473 mixin(uuid!(ID2D1ComputeInfo, "5598b14b-9fd7-48b7-9bdb-8f0964eb38bc"));
474 /// <summary>
475 /// A transform uses this interface to specify how to render a particular pass using
476 /// compute shader.
477 /// </summary>
478 interface ID2D1ComputeInfo : ID2D1RenderInfo
479 {
480 	extern(Windows):
481     /// <summary>
482     /// Set the constant buffer for this transform.
483     /// </summary>
484     HRESULT SetComputeShaderConstantBuffer(
485         const(BYTE)* buffer,
486         UINT32 bufferCount 
487         );
488     
489     /// <summary>
490     /// Set the shader instructions for this transform.
491     /// </summary>
492     HRESULT SetComputeShader(REFGUID shaderId);
493     
494     /// <summary>
495     /// Sets the resource texture corresponding to the given shader texture index.
496     /// </summary>
497     HRESULT SetResourceTexture(
498         UINT32 textureIndex,
499         ID2D1ResourceTexture resourceTexture 
500         );
501 } // interface ID2D1ComputeInfo
502 
503 
504 mixin(uuid!(ID2D1TransformNode, "b2efe1e7-729f-4102-949f-505fa21bf666"));
505 /// <summary>
506 /// A base object which can be inserted into a transform graph.
507 /// </summary>
508 interface ID2D1TransformNode : IUnknown
509 {
510 	extern(Windows):
511     /// <summary>
512     /// Return the number of input this node has.
513     /// </summary>
514     UINT32 GetInputCount() const;
515 } // interface ID2D1TransformNode
516 
517 
518 mixin(uuid!(ID2D1TransformGraph, "13d29038-c3e6-4034-9081-13b53a417992"));
519 /// <summary>
520 /// The implementation of the actual graph.
521 /// </summary>
522 interface ID2D1TransformGraph : IUnknown
523 {
524 	extern(Windows):
525     /// <summary>
526     /// Return the number of input this graph has.
527     /// </summary>
528     UINT32 GetInputCount() const;
529     
530     /// <summary>
531     /// Sets the graph to contain a single transform whose inputs map 1:1 with effect
532     /// inputs.
533     /// </summary>
534     HRESULT SetSingleTransformNode(ID2D1TransformNode node);
535     
536     /// <summary>
537     /// Adds the given transform node to the graph.
538     /// </summary>
539     HRESULT AddNode(ID2D1TransformNode node);
540     
541     /// <summary>
542     /// Removes the given transform node from the graph.
543     /// </summary>
544     HRESULT RemoveNode(ID2D1TransformNode node);
545     
546     /// <summary>
547     /// Indicates that the given transform node should be considered to be the output
548     /// node of the graph.
549     /// </summary>
550     HRESULT SetOutputNode(ID2D1TransformNode node);
551     
552     /// <summary>
553     /// Connects one node to another node inside the graph.
554     /// </summary>
555     HRESULT ConnectNode(
556         ID2D1TransformNode fromNode,
557         ID2D1TransformNode toNode,
558         UINT32 toNodeInputIndex 
559         );
560     
561     /// <summary>
562     /// Connects a transform node inside the graph to the corresponding input of the
563     /// encapsulating effect.
564     /// </summary>
565     HRESULT ConnectToEffectInput(
566         UINT32 toEffectInputIndex,
567         ID2D1TransformNode node,
568         UINT32 toNodeInputIndex 
569         );
570     
571     /// <summary>
572     /// Clears all nodes and connections from the transform graph.
573     /// </summary>
574     void Clear();
575     
576     /// <summary>
577     /// Uses the specified input as the effect output.
578     /// </summary>
579     HRESULT SetPassthroughGraph(
580         UINT32 effectInputIndex 
581         );
582 } // interface ID2D1TransformGraph
583 
584 
585 mixin(uuid!(ID2D1Transform, "ef1a287d-342a-4f76-8fdb-da0d6ea9f92b"));
586 /// <summary>
587 /// The interface implemented by a transform author.
588 /// </summary>
589 interface ID2D1Transform : ID2D1TransformNode
590 {
591 	extern(Windows):
592     HRESULT MapOutputRectToInputRects(
593         const(D2D1_RECT_L)* outputRect,
594         D2D1_RECT_L* inputRects,
595         UINT32 inputRectsCount 
596         ) const;
597     
598     HRESULT MapInputRectsToOutputRect(
599         const(D2D1_RECT_L)* inputRects,
600         const(D2D1_RECT_L)* inputOpaqueSubRects,
601         UINT32 inputRectCount,
602         D2D1_RECT_L* outputRect,
603         D2D1_RECT_L* outputOpaqueSubRect 
604         );
605     
606     HRESULT MapInvalidRect(
607         UINT32 inputIndex,
608         D2D1_RECT_L invalidInputRect,
609         D2D1_RECT_L* invalidOutputRect 
610         ) const;
611 } // interface ID2D1Transform
612 
613 
614 mixin(uuid!(ID2D1DrawTransform, "36bfdcb6-9739-435d-a30d-a653beff6a6f"));
615 /// <summary>
616 /// The interface implemented by a transform author to provide a GPU-based effect.
617 /// </summary>
618 interface ID2D1DrawTransform : ID2D1Transform
619 {
620 	extern(Windows):
621     HRESULT SetDrawInfo(ID2D1DrawInfo drawInfo);
622 } // interface ID2D1DrawTransform
623 
624 
625 mixin(uuid!(ID2D1ComputeTransform, "0d85573c-01e3-4f7d-bfd9-0d60608bf3c3"));
626 /// <summary>
627 /// The interface implemented by a transform author to provide a Compute Shader
628 /// based effect.
629 /// </summary>
630 interface ID2D1ComputeTransform : ID2D1Transform
631 {
632     extern(Windows):
633     HRESULT SetComputeInfo(ID2D1ComputeInfo computeInfo);
634     
635     HRESULT CalculateThreadgroups(
636         const(D2D1_RECT_L)* outputRect,
637         UINT32* dimensionX,
638         UINT32* dimensionY,
639         UINT32* dimensionZ 
640         );
641 } // interface ID2D1ComputeTransform
642 
643 
644 mixin(uuid!(ID2D1AnalysisTransform, "0359dc30-95e6-4568-9055-27720d130e93"));
645 /// <summary>
646 /// The interface implemented by a transform author to indicate that it should
647 /// receive an analysis result callback.
648 /// </summary>
649 interface ID2D1AnalysisTransform : IUnknown
650 {
651     extern(Windows):
652     HRESULT ProcessAnalysisResults(
653         const(BYTE)* analysisData,
654         UINT32 analysisDataCount 
655         );
656 } // interface ID2D1AnalysisTransform
657 
658 
659 mixin(uuid!(ID2D1SourceTransform, "db1800dd-0c34-4cf9-be90-31cc0a5653e1"));
660 /// <summary>
661 /// The interface implemented by a transform author to provide a CPU based source
662 /// effect.
663 /// </summary>
664 interface ID2D1SourceTransform : ID2D1Transform
665 {
666     extern(Windows):
667     HRESULT SetRenderInfo(ID2D1RenderInfo renderInfo);
668     
669     HRESULT Draw(
670         ID2D1Bitmap1 target,
671         const(D2D1_RECT_L)* drawRect,
672         D2D1_POINT_2U targetOrigin 
673         );
674 } // interface ID2D1SourceTransform
675 
676 
677 mixin(uuid!(ID2D1ConcreteTransform, "1a799d8a-69f7-4e4c-9fed-437ccc6684cc"));
678 /// <summary>
679 /// Base interface for built-in transforms on which precision and caching may be
680 /// controlled.
681 /// </summary>
682 interface ID2D1ConcreteTransform : ID2D1TransformNode
683 {
684     extern(Windows):
685     /// <summary>
686     /// Controls the output precision and channel-depth for this transform.
687     /// </summary>
688     HRESULT SetOutputBuffer(
689         D2D1_BUFFER_PRECISION bufferPrecision,
690         D2D1_CHANNEL_DEPTH channelDepth 
691         );
692     
693     /// <summary>
694     /// Controls whether the output of this transform is cached.
695     /// </summary>
696     void SetCached(BOOL isCached);
697 } // interface ID2D1ConcreteTransform
698 
699 
700 mixin(uuid!(ID2D1BlendTransform, "63ac0b32-ba44-450f-8806-7f4ca1ff2f1b"));
701 /// <summary>
702 /// An effect uses this interface to configure a blending operation.
703 /// </summary>
704 interface ID2D1BlendTransform : ID2D1ConcreteTransform
705 {
706     extern(Windows):
707     void SetDescription(const(D2D1_BLEND_DESCRIPTION)* description);
708     
709     void GetDescription(D2D1_BLEND_DESCRIPTION* description) const;
710 } // interface ID2D1BlendTransform
711 
712 
713 mixin(uuid!(ID2D1BorderTransform, "4998735c-3a19-473c-9781-656847e3a347"));
714 /// <summary>
715 /// An effect uses this interface to configure border generation.
716 /// </summary>
717 interface ID2D1BorderTransform :ID2D1ConcreteTransform
718 {
719     extern(Windows):
720     void SetExtendModeX(D2D1_EXTEND_MODE extendMode);
721     
722     void SetExtendModeY(D2D1_EXTEND_MODE extendMode);
723     
724     D2D1_EXTEND_MODE GetExtendModeX() const;
725     
726     D2D1_EXTEND_MODE GetExtendModeY() const;
727 } // interface ID2D1BorderTransform
728 
729 
730 mixin(uuid!(ID2D1OffsetTransform, "3fe6adea-7643-4f53-bd14-a0ce63f24042"));
731 /// <summary>
732 /// An effect uses this interface to offset an image without inserting a rendering
733 /// pass.
734 /// </summary>
735 interface ID2D1OffsetTransform : ID2D1TransformNode
736 {
737     extern(Windows):
738     void SetOffset(D2D1_POINT_2L offset);
739     
740     D2D1_POINT_2L GetOffset() const;
741 } // interface ID2D1OffsetTransform
742 
743 
744 mixin(uuid!(ID2D1BoundsAdjustmentTransform, "90f732e2-5092-4606-a819-8651970baccd"));
745 /// <summary>
746 /// An effect uses this interface to alter the image rectangle of its input.
747 /// </summary>
748 interface ID2D1BoundsAdjustmentTransform : ID2D1TransformNode
749 {
750     extern(Windows):
751     void SetOutputBounds(const(D2D1_RECT_L)* outputBounds);
752     
753     void GetOutputBounds(D2D1_RECT_L* outputBounds) const;
754 } // interface ID2D1BoundsAdjustmentTransform
755 
756 
757 mixin(uuid!(ID2D1EffectImpl, "a248fd3f-3e6c-4e63-9f03-7f68ecc91db9"));
758 /// <summary>
759 /// This is the interface implemented by an effect author, along with the
760 /// constructor and registration information.
761 /// </summary>
762 interface ID2D1EffectImpl : IUnknown
763 {
764     extern(Windows):
765     /// <summary>
766     /// Initialize the effect with a context and a transform graph. The effect must
767     /// populate the transform graph with a topology and can update it later.
768     /// </summary>
769     HRESULT Initialize(
770         ID2D1EffectContext effectContext,
771         ID2D1TransformGraph transformGraph 
772         );
773     
774     /// <summary>
775     /// Initialize the effect with a context and a transform graph. The effect must
776     /// populate the transform graph with a topology and can update it later.
777     /// </summary>
778     HRESULT PrepareForRender(
779         D2D1_CHANGE_TYPE changeType 
780         );
781     
782     /// <summary>
783     /// Sets a new transform graph to the effect.  This happens when the number of
784     /// inputs to the effect changes, if the effect support a variable number of inputs.
785     /// </summary>
786     HRESULT SetGraph(
787         ID2D1TransformGraph transformGraph 
788         );
789 } // interface ID2D1EffectImpl
790 
791 
792 mixin(uuid!(ID2D1EffectContext, "3d9f916b-27dc-4ad7-b4f1-64945340f563"));
793 /// <summary>
794 /// The internal context handed to effect authors to create transforms from effects
795 /// and any other operation tied to context which is not useful to the application
796 /// facing API.
797 /// </summary>
798 interface ID2D1EffectContext : IUnknown
799 {
800     
801     void GetDpi(
802         FLOAT* dpiX,
803         FLOAT* dpiY 
804         ) const;
805     
806     /// <summary>
807     /// Create a new effect, the effect must either be built in or previously registered
808     /// through ID2D1Factory1::RegisterEffect.
809     /// </summary>
810     HRESULT CreateEffect(
811         REFCLSID effectId,
812         ID2D1Effect *effect 
813         );
814     
815     HRESULT GetMaximumSupportedFeatureLevel(
816         const(D3D_FEATURE_LEVEL)* featureLevels,
817         UINT32 featureLevelsCount,
818         D3D_FEATURE_LEVEL* maximumSupportedFeatureLevel 
819         ) const;
820     
821     /// <summary>
822     /// Create a transform node from the passed in effect.
823     /// </summary>
824     HRESULT CreateTransformNodeFromEffect(
825         ID2D1Effect effect,
826         ID2D1TransformNode *transformNode 
827         );
828     
829     HRESULT CreateBlendTransform(
830         UINT32 numInputs,
831         const(D2D1_BLEND_DESCRIPTION)* blendDescription,
832         ID2D1BlendTransform *transform 
833         );
834     
835     HRESULT CreateBorderTransform(
836         D2D1_EXTEND_MODE extendModeX,
837         D2D1_EXTEND_MODE extendModeY,
838         ID2D1BorderTransform *transform 
839         );
840     
841     HRESULT CreateOffsetTransform(
842         D2D1_POINT_2L offset,
843         ID2D1OffsetTransform *transform 
844         );
845     
846     HRESULT CreateBoundsAdjustmentTransform(
847         const(D2D1_RECT_L)* outputRectangle,
848         ID2D1BoundsAdjustmentTransform *transform 
849         );
850     
851     HRESULT LoadPixelShader(
852         REFGUID shaderId,
853         const(BYTE)* shaderBuffer,
854         UINT32 shaderBufferCount 
855         );
856     
857     HRESULT LoadVertexShader(
858         REFGUID resourceId,
859         const(BYTE)* shaderBuffer,
860         UINT32 shaderBufferCount 
861         );
862     
863     HRESULT LoadComputeShader(
864         REFGUID resourceId,
865         const(BYTE)* shaderBuffer,
866         UINT32 shaderBufferCount 
867         );
868     
869     BOOL IsShaderLoaded(REFGUID shaderId);
870     
871     HRESULT CreateResourceTexture(
872         const(GUID)* resourceId,
873         const(D2D1_RESOURCE_TEXTURE_PROPERTIES)* resourceTextureProperties,
874     	const(BYTE)* data,
875         const(UINT32)* strides,
876         UINT32 dataSize,
877         ID2D1ResourceTexture *resourceTexture 
878         );
879     
880     HRESULT FindResourceTexture(
881         const(GUID)* resourceId,
882         ID2D1ResourceTexture *resourceTexture 
883         );
884     
885     HRESULT CreateVertexBuffer(
886         const(D2D1_VERTEX_BUFFER_PROPERTIES)* vertexBufferProperties,
887         const(GUID)* resourceId,
888         const(D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES)* customVertexBufferProperties,
889         ID2D1VertexBuffer *buffer 
890         );
891     
892     HRESULT FindVertexBuffer(
893         const(GUID)* resourceId,
894         ID2D1VertexBuffer *buffer 
895         );
896     
897     /// <summary>
898     /// Creates a color context from a color space.  If the space is Custom, the context
899     /// is initialized from the profile/profileSize arguments.  Otherwise the context is
900     /// initialized with the profile bytes associated with the space and
901     /// profile/profileSize are ignored.
902     /// </summary>
903     HRESULT CreateColorContext(
904         D2D1_COLOR_SPACE space,
905         const(BYTE)* profile,
906         UINT32 profileSize,
907         ID2D1ColorContext *colorContext 
908         );
909     
910     HRESULT CreateColorContextFromFilename(
911         PCWSTR filename,
912         ID2D1ColorContext *colorContext 
913         );
914     
915     HRESULT CreateColorContextFromWicColorContext(
916         IWICColorContext wicColorContext,
917         ID2D1ColorContext *colorContext 
918         );
919     
920     HRESULT CheckFeatureSupport(
921         D2D1_FEATURE feature,
922         void* featureSupportData,
923         UINT32 featureSupportDataSize 
924         ) const;
925     
926     /// <summary>
927     /// Indicates whether the buffer precision is supported by D2D.
928     /// </summary>
929     BOOL IsBufferPrecisionSupported(D2D1_BUFFER_PRECISION bufferPrecision) const;
930 } // interface ID2D1EffectContext